package com.aizhixin.test.question.dto;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;

import javax.persistence.OneToMany;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@ApiModel(description="题目")
@NoArgsConstructor//帮助我们生成没有参数的构造方法
@ToString
public class QuestionDTO {
	@ApiModelProperty(value="ID")
	@Getter@Setter Long id;


    @ApiModelProperty(value = "题目内容")

    @Getter @Setter private String content;

    @ApiModelProperty(value = "题目答案")

    @Getter @Setter private String answer;

    @ApiModelProperty(value = "知识领域")
 
    @Getter @Setter private String knowledgeArea;
//fetch==取来，cascade==倾注
	@ApiModelProperty(value="包含选项")
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="question")
	@Getter@Setter private List<QuestionOptionDTO> options;
	
 }